<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <title>反转文本的顺序</title>
</head>
<body>
<script>
    var values = prompt('Please enter a set of comma separated values.', 'Apples,Oranges,Bananas');
    function splitAndReverseText(csv) {
        var parts = csv.split(',');
        parts.reverse();
        var reversedString = parts.join(',');
        alert(reversedString);
    }
    splitAndReverseText(values);
</script>
</body>
</html>